============
SieveManager
============

Sieve_ is a programming language for filtering mail. Sieve scripts are
executed on the mail server when mail is delivered to an inbox, so they
have to be uploaded to the mail server.

SieveManager is a command-line for uploading, downloading, and managing
remote Sieve scripts using the ManageSieve protocol. It can also be used
as a Python module.

.. warning::
    SieveManager is a work-in-progress. The command-line interface,
    the configuration semantics, and the Python API are subject to change.
    And it's probably buggy around the edges.


EXAMPLE
=======

Upload and activate a Sieve script:

.. code:: none

    $ sievemgr user@imap.foo.example
    sieve://user@imap.foo.example> put script.sieve
    sieve://user@imap.foo.example> activate script.sieve

In Python:

.. code:: python

    from sievemgr import SieveManager

    with SieveManager('imap.foo.example', 'user', 'password') as mgr:
        with open('sieve.script', 'br') as script:
            mgr.putscript(script, script.name)
        mgr.setactive('sieve.script')


FEATURES
========

* Full compliance with :rfc:`5804` (ManageSieve protocol).

* Automated logins (using password managers,
  password files, or `.netrc <netrc_>`_)

* Automatic backups

* Tab-completion

* Scriptable

* CRAM-MD5, EXTERNAL, LOGIN, PLAIN, SCRAM-SHA-\*,
  SCRAM-SHA-\*-PLUS, [#untested]_ SCRAM-SHA3-512, and
  SCRAM-SHA3-512-PLUS [#untested]_ authentication

* Proxy authentication

* TLS `Server Name Indication`_.

* Checks whether TLS certificates have been revoked
  (using lightweight OCSP_).

* TLS client authentication

* IPv6

.. [#untested] Untested.


LICENSE
=======

Copyright 2023 and 2024  Odin Kroeger

SieveManager is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the FreeSoftware Foundation, either version 3 of the License, or (at
your option) any later version.

SieveManager is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the :doc:`GNU General Public License <licence>` for more details.

You should have received a copy of the GNU General Public License
along with SieveManager. If not, see <https://www.gnu.org/licenses/>.


.. toctree::
   :hidden:
   :titlesonly:

   install
   sievemgr
   sieve.cf
   module
   security
   feedback
   contrib
   Change log <changelog>
   Licence <licence>
   genindex
